home *** CD-ROM | disk | FTP | other *** search
- #pragma once
-
- #include <StringTools.h>
-
- /*=======================================================================*/
- /*= This file contains a set of utilities for handling the File Manager =*/
- /*= NOTE: REQUIRES FileTools.RSRC =*/
- /*=======================================================================*/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- typedef pascal void (*FDActionProc)(CInfoPBRec *InfoRec, void *UserData);
-
- long DirIDFromFSSpec (FSSpecPtr theSpec);
- /* given a name, parent ID, and volrefnum in theSpec, return */
- /* the directory ID of the directory they specify. Return -1 */
- /* if an error occurs */
-
- FSSpecPtr FSSpecFromCInfo (CInfoPBPtr CB);
- /* construct and return an FSSpec record describing the file/directory */
- /* whose information is passed in the CBInfoRec structure */
-
- FSSpecPtr FSSpecFromSFReply (SFReply *SFR);
- /* given a file specification from one of the standard file */
- /* routines, construct an FSSpec for use with the low level file */
- /* routines. Return FALSE if it cannot be constructed */
-
- long GetCurrentDirectory (void);
- /* return the ID of the current directory */
-
- short GetCurrentVolume (void);
- /* return the ID of the current volume */
-
- void SetCurrentVolume (short newVRefNum);
- /* set the ID of the current volume */
-
- void SetCurrentDirectory (long newDirID);
- /* set the ID of the current directory */
-
- void GetDirectory (StandardFileReply *SFReply);
- /* Return the FSSpec of a directory chosen with the std file dialog*/
-
- void TraverseDirectory (FSSpec *Directory, FDActionProc FileAction,
- FDActionProc FolderAction, void *UserData);
- /* Given the specification of a directory, traverse its contents */
- /* recursively, applying FileAction to each file, and FolderAction */
- /* to each folder/directory that is encountered */
-
- StringPtr PathNameFromFSSpec (FSSpecPtr fileID);
- /* given the specification of a file, return its full path name */
-
- StringPtr PathNameFromCInfo (CInfoPBPtr CB);
- /* given the specification of a file, return its full path name */
-
- #ifdef __cplusplus
- }
- #endif